package com.ruoyi.checkingin.service.impl;

import java.util.List;

import com.ruoyi.checkingin.service.IECheckTimeService;
import com.ruoyi.common.core.domain.e_checkingin.ECheckTime;
import com.ruoyi.common.core.domain.e_checkingin.ERpRecord;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.checkingin.mapper.ERpStandardMapper;
import com.ruoyi.common.core.domain.e_checkingin.ERpStandard;
import com.ruoyi.checkingin.service.IERpStandardService;

/**
 * 奖惩信息Service业务层处理
 * 
 * @author JYW
 * @date 2024-01-30
 */
@Service
public class ERpStandardServiceImpl implements IERpStandardService 
{
    @Autowired
    private ERpStandardMapper eRpStandardMapper;

    @Autowired
    private IECheckTimeService checkTimeService;

    /**
     * 查询奖惩信息
     * 
     * @param id 奖惩信息主键
     * @return 奖惩信息
     */
    @Override
    public ERpStandard selectERpStandardById(Long id)
    {
        return eRpStandardMapper.selectERpStandardById(id);
    }

    /**
     * 查询奖惩信息列表
     * 
     * @param eRpStandard 奖惩信息
     * @return 奖惩信息
     */
    @Override
    public List<ERpStandard> selectERpStandardList(ERpStandard eRpStandard)
    {
        return eRpStandardMapper.selectERpStandardList(eRpStandard);
    }

    /**
     * 新增奖惩信息
     * 
     * @param eRpStandard 奖惩信息
     * @return 结果
     */
    @Override
    public int insertERpStandard(ERpStandard eRpStandard)
    {
        eRpStandard.setCreateTime(DateUtils.getNowDate());
        return eRpStandardMapper.insertERpStandard(eRpStandard);
    }

    /**
     * 修改奖惩信息
     * 
     * @param eRpStandard 奖惩信息
     * @return 结果
     */
    @Override
    public int updateERpStandard(ERpStandard eRpStandard)
    {
        eRpStandard.setUpdateTime(DateUtils.getNowDate());
        return eRpStandardMapper.updateERpStandard(eRpStandard);
    }

    /**
     * 批量删除奖惩信息
     * 
     * @param ids 需要删除的奖惩信息主键
     * @return 结果
     */
    @Override
    public int deleteERpStandardByIds(Long[] ids)
    {
        return eRpStandardMapper.deleteERpStandardByIds(ids);
    }

    /**
     * 删除奖惩信息信息
     * 
     * @param id 奖惩信息主键
     * @return 结果
     */
    @Override
    public int deleteERpStandardById(Long id)
    {
        return eRpStandardMapper.deleteERpStandardById(id);
    }


}
